// 登录相关接口
import https from "../request.js";

let apBox = {};
// 获取首页相关信息
apBox.getHomeInfo = (data) => {
  // return https.get("/box/index", data); //第一版
  return https.get("/box/index-v2", data); //第二版
};
// 下单
apBox.getPayOrderInfo = (data) => {
  return https.post("/pay/order", data);
};
// 获取订单信息
apBox.getOrderInfo = (data) => {
  return https.get("/order/get-by-order-id", data);
};
// 打开盲盒
apBox.openBox = (data) => {
  return https.post("/user-box/open", data);
};
// 获取我的盲盒相关信息
apBox.getMyBoxInfo = (data) => {
  return https.get("/user-box/get-by-status-and-user-id", data);
};
// 获取盲盒规则
apBox.getBoxRuleContent = () => {
  return https.get("/content/get-rule", );
};
// 获取客服联系方式
apBox.getBoxRuleContact = () => {
  return https.get("/content/get-contact", );
};

// 获取盲盒详情
apBox.getBlindBoxDetail = (data) => {
  return https.get("/box/get-detail", data);
};
// 确认收货
apBox.receiveGoods = (data) => {
  return https.post("/user-box/receive", data);
};
// 盲盒记录设置虚拟账号
apBox.seUserBoxtTel = (data) => {
  return https.post("/user-box/set-tel", data);
};
// nav菜单获取红点数量
apBox.getNavNum = (data) => {
  return https.get("/box/nav", data);
};
// 查询充值状态
apBox.getRechargeStatus= (data) => {
  return https.get("/user-box/get-top-up-info-by-user-box-id", data);
};

export default apBox;
